package com.chenyun.store.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * @author Lonni
 * @date 2022-09-24 11:21
 */
@TableName("oss_file_chunk")
@Data
@Builder
public class FileChunk {
    @TableId(type = IdType.AUTO)
    private String id;

    private Integer chunkNumber;

    private Double chunkSize;

    private Double currentChunkSize;

    private Integer totalChunks;

    private Double totalSize;

    private String identifier;

    private String fileName;

    private String relativePath;

    /**
     * 存储类型,本地还是云存储 参考枚举: FileConfigDTO.FileStoreEnum
     */
    private String storeName;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;



}
